<form action="/gaeste/saveuser" method="post">
	<table>
		<thead>
			<tr>
				<th colspan="4">Neuen Gast hinzufügen</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td class="bold">Zusage</td>
				<td>
					<select name="status">
						<% if(request.gast?.status == 2) {%>
							<option selected="selected" value="2">Noch offen</option>
						<% } else { %>
							<option value="2">Noch offen</option>
						<% }  %>
						<% if(request.gast?.status == 0) {%>
							<option selected="selected" value="0">Nein</option>
						<% } else { %>
							<option value="0">Nein</option>
						<% }  %>
						<% if(request.gast?.status == 1) {%>
							<option selected="selected" value="1">Ja</option>
						<% } else { %>
							<option value="1">Ja</option>
						<% }  %>
					</select>
				</td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td class="bold">Vorname</td>
				<td>
				  <% if(request.gast?.vorname) {%>
				    <input type="text" name="vorname" value="${request.gast.vorname}" />
				  <% } else {%>
				    <input type="text" name="vorname" />
				  <% } %>
				</td>
				<td class="bold">Nachname</td>
				<td>
				 <% if(request.gast?.nachname) {%>
				    <input type="text" name="nachname" value="${request.gast.nachname}" />
				  <% } else {%>
				    <input type="text" name="nachname" />
				  <% } %>
				</td>
			</tr>
			<tr>
				<td class="bold">Straße</td>
				<td colspan="3">
				 <% if(request.gast?.strasse) {%>
				    <input class="breiter" type="text" name="strasse" value="${request.gast.strasse}" />
				  <% } else {%>
				    <input class="breiter" type="text" name="strasse" />
				  <% } %>
			   </td>
			</tr>
			<tr>
				<td class="bold">PLZ</td>
				<td>
				  <% if(request.gast?.plz) {%>
				    <input type="text" name="plz" value="${request.gast.plz}" />
				  <% } else {%>
				    <input type="text" name="plz" />
				  <% } %>
				</td>
				<td class="bold">Ort</td>
				<td>
				 <% if(request.gast?.ort) {%>
				    <input type="text" name="ort" value="${request.gast.ort}" />
				  <% } else {%>
				    <input type="text" name="ort" />
				  <% } %>
				</td>
			</tr>
			<tr>
				<td class="bold">Rolle</td>
				<td>
					<select name="rolle">
						 <% request.listrole.each { item -> %>
					
						 <% if(request.gast?.rolle == item.id) {%>
						   <option selected="selected" value="${item.id}">${item.bezeichnung}</option>
						 <% } else {%>
						   <option value="${item.id}">${item.bezeichnung}</option>
						 <% } %>
					 <% } %>
					</select>
				</td>
				<td class="bold">Kategorie</td>
				<td><select name="kategorie">
					<% request.listkat.each { item -> %>
					
						 <% if(request.gast?.kategorie == item.id) {%>
						   <option selected="selected" value="${item.id}">${item.bezeichnung}</option>
						 <% } else {%>
						   <option value="${item.id}">${item.bezeichnung}</option>
						 <% } %>
					 <% } %>
					</select>
				</td>
			</tr>
			<tr>
				<td class="bold">Anmerkung</td>
				<td colspan="3"> 
				<% if(request.gast?.anmerkung) {%>
				    <textarea class="breiter" name="anmerkung"  >${request.gast.anmerkung}</textarea>
				  <% } else {%>
				    <textarea class="breiter" name="anmerkung" ></textarea>
				  <% } %>
				  </td>
			</tr> 
		
			<tr>
		 		<td class="bold">Telefon</td>
			 	<td><input type="text" name="telefon" value="${request.telefon}"/></td>
			 	<td class="bold">Handy</td>
			 	<td><input type="text" name="handy" value="${request.handy}"/></td>
			</tr>
			<tr>
				<td class="bold">E-Mail</td>
				<td colspan="3"><input class="breiter" type="text" name="email" value="${request.email}"/></td>
			</tr>
		</tbody>
	</table>
	<br/><br/>
	<input class="buttonlogin" type="submit" value="Erstellen" />
</form>